﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Reporting.WebForms;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using trangbaocao.Models;
using System.ComponentModel;

namespace trangbaocao.Reports.Main_Stations
{
    public partial class ReportMain_Stations : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ReportViewer1.Reset();
                Main_StationsModel Main_StationsModel = new Main_StationsModel();
                ReportViewer1.LocalReport.ReportPath = "Reports/Main_Stations/List_Main_Stations/Main_Stations.rdlc";
                ReportViewer1.LocalReport.DataSources.Clear();
                ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("main_stations_dataset", Main_StationsModel.bc_Chungloaithietbi().Tables[0]));
                ReportViewer1.DataBind();
                ReportViewer1.LocalReport.Refresh();
                
            }
        }
    }
}